<script id="list-tpl" type="text/html"
        data-params='{"url":"/education/admin/order","dataName":"orderData","pageid":"#page", "method":"post"}'>
    <table id="example" class="layui-table lay-even" data-name="orderData" data-tplid="list-tpl">
        <thead>
            <tr>
                <th width="30"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check"
                                      lay-skin="primary"></th>
                <th width="150">订单号</th>
                <th width="200">订单备注</th>
                <th>总价(元)</th>
                <th>订单状态</th>
                <th>下单人</th>
                <th>下单时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {{# layui.each(d.list, function(index, item){ }}
            {{# if(item.status == 0){ }} <tr style="background-color: #ffcf22"> {{# } else { }}
            <tr>
            {{# } }}
                <td><input type="checkbox" name="checkbox" value="{{ item.id}}" lay-skin="primary"></td>
                <td><a href="#" onclick="javascript:viewDetail('{{item.id}}')">{{ item.order_no }}</a></td>
                <td>{{ item.order_memo}}</td>
                <!--<td>
                    {{# if(item.img) { }}
                    <img src="/education{{ item.img }}" alt="..." class="img-thumbnail">
                    {{# } else { }}
                    {{# } }}
                </td>-->

                {{# if(item.order_status == 10) { }}
                <td class="edit" data-list='{"key":"id={{ item.id}}","filed":"price","render":"true"}'
                    data-params='{"url":"/education/admin/order/updatePrice/{{ item.id}}" }'>
                    {{ item.total_amount }}</td>
                {{# } else { }}
                <td> {{ item.total_amount }}</td>
                {{# } }}

                <td>{{ item.order_status_desc||'' }}</td>
                <td>{{ item.order_username||'' }}</td>
                <td>{{# if(item.create_time == null){ }} {{#  } else { }} {{ item.create_time}}  {{#  } }}</td>
                <td>
                    {{# if(item.order_status == 11 || item.order_status == 42){ }}
                    <!--<button class="layui-btn layui-btn-mini modal-catch" style="background-color: #91b6ff"
                            data-params='{"content": ".send-subcat","area":"500px,400px","title":"订单【{{ item.order_no}}】发货","key":"id={{ item.id }}","type":"1"}'>
                        {{# if(item.station_status == 411){ }} 备货 {{#  } else { }} 发货  {{#  } }}
                    </button>-->
                    <button style="background-color: #0b48ff" class="layui-btn layui-btn-mini"
                            onclick="send('{{item.id}}', '{{item.order_no}}', '{{item.station_status}}');">
                        {{# if(item.station_status == 411){ }} 备货 {{#  } else { }} 发货  {{#  } }}
                    </button>
                    {{# } }}
                    {{# if(item.order_status == 40){ }}
                    <button class="layui-btn layui-btn-mini" style="background-color: #ff2c1a"
                            onclick="refund('{{ item.id}}', '{{item.order_no}}');">
                        <!--<i class="iconfont">&#xe653;</i>-->退款
                    </button>
                    {{# } }}

                    {{# if(item.order_status == 20){ }}
                    <button class="layui-btn layui-btn-mini ajax" style="background-color: #0d7bdc"
                            data-list='{"key":"id={{ item.id}}","msg":true,"render":"true","action":"del"}'
                            data-params='{"url": "/education/admin/order/receive","data":"id={{ item.id}}", "method":"post", "confirm":"true"}'>
                        收货
                    </button>
                    {{# } }}

                    {{# if(item.order_status != 30 && item.order_status != 31 && item.order_status != 32){ }}
                    <button class="layui-btn layui-btn-mini layui-btn-danger ajax"
                            data-list='{"key":"id={{ item.id}}","msg":true,"render":"true","action":"del"}'
                            data-params='{"url": "/education/admin/order/close","data":"id={{ item.id}}", "method":"post", "confirm":"true"}'>
                        关闭
                    </button>
                    {{# } }}

                    <button class="layui-btn layui-btn-mini" onclick="viewItem('{{item.id}}', '{{item.order_no}}',
                    '{{item.total_amount}}', '{{item.order_price}}', '{{item.freight}}');">
                        <!--<i class="iconfont">&#xe653;</i>-->明细
                    </button>
                    <button class="layui-btn layui-btn-mini"
                            onclick="javascript:window.open('/education/admin/order/print/{{item.id}}?version=3');">
                        <!--<i class="iconfont">&#xe653;</i>-->打印
                    </button>
                    <!--<button class="layui-btn layui-btn-mini" onclick="viewDetail('{{ item.id}}');">
                        <i class="iconfont">&#xe653;</i>打印
                    </button>-->
                    <!--<button class="layui-btn layui-btn-mini layui-btn-danger ajax"
                            data-list='{"key":"id={{ item.id}}","msg":true,"render":"true","action":"del"}'
                            data-params='{"url": "/education/admin/order/delete","data":"id={{ item.id}}", "method":"post", "confirm":"true"}'>
                        <i class="iconfont">&#xe626;</i>删除
                    </button>-->
                </td>
            </tr>
            {{# }); }}
        </tbody>

    </table>
</script>